<?php

class User_Controller_Admincp_Manage_Index extends Nuo_Controller_Admincp
{
	function execute($request)
	{
		Nuo::setVar('breadcrum', array(
			'title' => 'Manage People',
			'toolbar' => 'admincp/user'
		));

		$userTable = Nuo::getTable('user');

		$roleTable = Nuo::getTable('permission/role');

		$select = $userTable -> select() 
		-> from(array('users' => $userTable -> getName())) 
		-> joinLeft(array('roles' => $roleTable -> getName()), 'users.role_id=roles.role_id');

		$paging = Paging::factory($select, $request -> getParam('page', 1), 20);

		return  $this -> render(array('paging' => $paging));
	}

}
